Gatsby Default StarterGatsby logo

#LinuxClient #Network #VM

DNS Settings on the Server

Setup settings are on the TP files.

What to not forget:

  • bind9 is the program for DNS server in Linux, install with apt install bind9
  • named is the command to check it's details
  • Don't forget the "." after the domain like "srvlx01.formation.lan."
  • systemctl restart named to start the DNS service, status to see the active status.
  • named-checkconf -z to see the DNS configuration

![[Pasted image 20240327144448.png]]

![[Pasted image 20240327144514.png]]

Troubleshooting:

  • Sometimes we will not be able to ping www.formation.lan. In this case, we will need to add the nameserver to the /etc/resolv.conf file but we cannot edit it.
  • To edit it once : sudo chattr -i /etc/resolv.conf
  • We go to nano /etc/resolv.conf and add nameserver 192.168.3.101 (which is the ip address of the server) to the second line
  • Save and exit
  • Then we prevent the editing of the resolv.conf with the command of : sudo chattr =i /etc/resolv.conf

We add the DNS address to the pfSense in System > General Setup as well, because pfsense dont see the domain by default (formation.lan) ![[Pasted image 20240327154542.png]] and disable the settings as following; ![[Pasted image 20240327155156.png]]

So now the DNS is helping us to go to www.formation.lan instead of the IP address 192.168.3.101.